[1] "R version 4.3.0 (2023-04-21 ucrt)"
[1] "2024-12-30"
2025-01-23
This portion of the talk will be found in the file history-of-r.pptx.
Screenshot of webpage for installation of R
Screenshot of main page for RStudio
Screenshot of products of RStudio
Screenshot of the directory structure I use
This is a very brief introduction to the basic objects in R.
[1] 1.732051
[1] 1.000000 1.414214 1.732051 2.000000 2.236068
---
title: "Illustrating the structure of an R program"
editor: source
format:
html:
embed-resources: true
execute:
error: true
---
This program was written by Steve Simon and created on 2019-01-28 with a major
revision on 2024-12-27. It is used to illustrate the structure of an R program.
This program is in the public domain. You can use it any way that you please.
```{r}
#| label: setup
#| message: false
#| warning: false
R.version.string
Sys.Date()
library(tidyverse)
```
Read data from the aids-cases text file. This file is described at
https://github.com/pmean/data/blob/main/files/aids-cases.yaml
```{r}
#| label: read-text-file
aids_cases <- read_csv(
file="../data/aids-cases.csv",
col_types="nnn")
glimpse(aids_cases)
```
This is a small dataset with only three variables. Now let's draw a line graph.
```{r}
#| label: line-graph
aids_cases |>
ggplot() +
aes(yr, nsw) +
geom_line()
```
There is an increasing trend in aids cases in New South Wales over time.
Many more in quarto guide
## Suggestions for nice looking comments
- Start line with ## for headlines
- Start lines with -, +, or * for bulleted lists
- Indent for sub bullets
- Surround text with ** for **bold**
- Surround text with $ for Greek letters ($\mu$) and math symbols ($\sqrt{2}$)
- Use [] for hyperlinks
Many more in [quarto guide][ref43]
[ref43]: https://quarto.org/docs/authoring/markdown-basics.html
In this segment, you will see a live demonstration running the program simon-5505-01-template.qmd.
There are standards in six areas:
There may be times when one or two of these standards do not apply. Which standards apply and which don’t should be obvious from the nature of the programming assignment.
Documentation should include
Always modify your graphs. Do not settle for the default options.
If you include a data set that you found on your own rather than one that your instructors provided, you must include a data dictionary. The elements of a data dictionary should include:
Include a complete URL, except if your data is behind a paywall. If your data is associated with a peer-reviewed publication, provide a formal reference to that publication.
Provide a few sentences explaining the context of your data. Explain how the data was collected and what it is being used for.
On the Internet, many datasets do not specify copyright: the conditions under which you can use the data. If copyright information is available, it might take several forms:
This file was written by Steve Simon on 2024-12-26. It is in the public domain and you can use it any way you please.
Hex sticker for tidyverse
Hex sticker for dplyr
Hex sticker for ggplot2
Hex sticker for magrittr
Hex sticker for readr
Hex sticker for stingr
Hex sticker for tibble
Hex sticker for tidyr